﻿using System;
using System.Collections.Generic;
using DC2010.Objects.Base;
using DC2010.Objects.Common;

namespace DC2010.Objects.Data
{
    [Serializable]
    public class SpellInfo : BaseInfo
    {
        /// <summary>
        /// Combination of runes used to invoke a spell
        /// </summary>
        public List<string> Runes { get; set; }
		
        /// <summary>
        /// In moment of succesfull cast - effects in this lists are called
        /// </summary>
        public List<KeyValue> CastEffects { get; set; }		
		
        public SpellInfo()
        {
            Runes = new List<string>();
        }

        public SpellData CreateData()
        {
            SpellData cd = new SpellData();

            cd.InfoId = Id;
            cd.Id = cd.InfoId + "_" + Guid.NewGuid().ToString();
            //TODO: fill with other properties
            Root.log.InfoFormat("Core, Created new object with id: {0} based on object {1}", cd.Id, cd.InfoId);
            Root.I.SpellSystem.AddData(cd);



            return cd;
        }
    }
}
